<?php

class Printer
{
    static $obj=null;
    private function _construct(){

    }
    static function getInstance(){
        if(is_null(self::$obj)){
              self::$obj=new printer();
        }
        return self::$obj;
    }

}

var_dump(Printer::getObj());
var_dump(printer::getObj());
var_dump(Printer::getObj()==Printer::getObj());